package com.hewep.demo.device;

import com.hewep.demo.device.controller.AllController;
import com.hewep.demo.device.controller.HandController;
import com.hewep.demo.device.directive.DeviceCmd;
import com.hewep.demo.device.mina.core.Constants;
import com.hewep.demo.device.mina.core.Routes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DeviceServer extends Server {
	private static final Logger log = LoggerFactory.getLogger(DeviceServer.class);
	@Override
	public void configConstant(Constants me) {

	}

	@Override
	public void configRoute(Routes me) {
		me.add(DeviceCmd.REQUEST_HAND.getCmd(), HandController.class);
		me.add(DeviceCmd.REQUEST_ALL.getCmd(), AllController.class);
	}
	
	public static void main(String[] args){
		Server server = new DeviceServer();
		try{
			boolean start = server.start();
			System.out.println(start);
		}catch(Exception e){
			e.printStackTrace();
		}
	}

}
